/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package otcapp.controlador.jdialogs.consultarPieza;

import java.awt.Font;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.JLabel;
import javax.swing.JTable;

/**
 *
 * @author diego
 */
public class HistorialSeguimientoPiezaJDialog extends javax.swing.JDialog {

    /**
     * Creates new form HistorialSeguimientoPiezaJDialog
     */
    public HistorialSeguimientoPiezaJDialog(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();
        tblHistorialSeguimiento.addMouseListener(new MouseAdapter() {

            @Override
            public void mouseClicked(MouseEvent e) {
                int columna = tblHistorialSeguimiento.getSelectedColumn();
                int fila = tblHistorialSeguimiento.getSelectedRow();
                String titulo = tblHistorialSeguimiento.getColumnName(columna);
                String valor = (String) tblHistorialSeguimiento.getValueAt(fila, columna);
                lblCellTitle.setText(titulo+": ");
                lblcellValue.setText(valor);
            }
        
        });
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jScrollPane1 = new javax.swing.JScrollPane();
        tblHistorialSeguimiento = new javax.swing.JTable();
        lblEtiquetaPieza = new javax.swing.JLabel();
        cabeceraJPanelSecundario1 = new otcapp.controlador.jpanels.CabeceraJPanelSecundario("Historial Seguimiento Pieza");
        lblid = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        lblTipo = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();
        lblInicio = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        lblDestino = new javax.swing.JLabel();
        lblCellTitle = new javax.swing.JLabel();
        lblcellValue = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

        tblHistorialSeguimiento.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane1.setViewportView(tblHistorialSeguimiento);

        lblEtiquetaPieza.setText("Identificación Pieza :");

        lblid.setFont(new java.awt.Font("Dialog", 0, 12)); // NOI18N
        lblid.setForeground(java.awt.Color.blue);
        lblid.setText("id Pieza");

        jLabel2.setText("Tipo Pieza: ");

        lblTipo.setFont(new java.awt.Font("Dialog", 0, 12)); // NOI18N
        lblTipo.setForeground(java.awt.Color.blue);
        lblTipo.setText("tipo");

        jLabel1.setText("Inicio Pieza: ");

        lblInicio.setFont(new java.awt.Font("Dialog", 0, 12)); // NOI18N
        lblInicio.setForeground(java.awt.Color.blue);
        lblInicio.setText("jLabel3");

        jLabel4.setText("Destino Pieza:");

        lblDestino.setFont(new java.awt.Font("Dialog", 0, 12)); // NOI18N
        lblDestino.setForeground(java.awt.Color.blue);
        lblDestino.setText("jLabel3");

        lblCellTitle.setText("Título Celda:");

        lblcellValue.setFont(new java.awt.Font("Dialog", 0, 12)); // NOI18N
        lblcellValue.setText("valor");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(cabeceraJPanelSecundario1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 769, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(jLabel2)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(lblTipo))
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(lblEtiquetaPieza)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(lblid)))
                        .addGap(50, 50, 50)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(jLabel1)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(lblInicio))
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(jLabel4)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(lblDestino)))
                        .addGap(0, 0, Short.MAX_VALUE))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(lblCellTitle)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblcellValue, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addComponent(cabeceraJPanelSecundario1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblEtiquetaPieza)
                    .addComponent(lblid)
                    .addComponent(jLabel1)
                    .addComponent(lblInicio))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(lblTipo)
                    .addComponent(jLabel4)
                    .addComponent(lblDestino))
                .addGap(24, 24, 24)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblCellTitle)
                    .addComponent(lblcellValue))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        Font newLabelFont = new Font(lblCellTitle.getFont().getName(),Font.BOLD,lblCellTitle.getFont().getSize());
        lblCellTitle.setFont(newLabelFont);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    public JLabel getLblEtiquetaPieza() {
        return lblEtiquetaPieza;
    }

    public JTable getTblHistorialSeguimiento() {
        return tblHistorialSeguimiento;
    }

    public JLabel getLblTipo() {
        return lblTipo;
    }

    public JLabel getLblid() {
        return lblid;
    }

    public JLabel getLblDestino() {
        return lblDestino;
    }

    public JLabel getLblInicio() {
        return lblInicio;
    }
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private otcapp.controlador.jpanels.CabeceraJPanelSecundario cabeceraJPanelSecundario1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JLabel lblCellTitle;
    private javax.swing.JLabel lblDestino;
    private javax.swing.JLabel lblEtiquetaPieza;
    private javax.swing.JLabel lblInicio;
    private javax.swing.JLabel lblTipo;
    private javax.swing.JLabel lblcellValue;
    private javax.swing.JLabel lblid;
    private javax.swing.JTable tblHistorialSeguimiento;
    // End of variables declaration//GEN-END:variables
}
